		function message() {
			document.write("<html>");
			document.write("<body>");
			document.write("<h3>Some Fields are empty or incorrectly typed. Please return and start over!</h3>");
			document.write("<a href=\"Register.html\">Return to Register</a>");
			document.write("</body>");
			document.write("</html>");
		}
		function check() {  
			var MIN_YEARS = 8;
			var MAX_YEARS = 100;
			var MIN_LENGTH = 0; 
			var userTextField = document.getElementById("userId");
			var passwordField = document.getElementById("passId");
			var ageField = document.getElementById("ageId");
				if (userTextField.value.length==MIN_LENGTH || 
					passwordField.value.length==MIN_LENGTH || 
					!(MIN_YEARS<=ageField.value && ageField.value<=MAX_YEARS))   
					message();
		}
		
		function checkPassword() {
		
			var pass = document.getElementById("passId");
			var chPass = document.getElementById("confirmPassId");
				
			if(pass.value != chPass.value) {
				message();
			}
		}
		